package com.zzh.media.recorder;

import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import android.util.Log;

import com.zzh.lib.recorder.HRecorder;
import com.zzh.lib.recorder.utils.HLog;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * Created by ZZH on 2021/11/28.
 *
 * @Date: 2021/11/28
 * @Email: zzh_hz@126.com
 * @QQ: 1299234582
 * @Author: zzh
 * @Description:
 */
public class HApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        HLog.setIsMp3Recorder(BuildConfig.DEBUG);
        HLog.setIsMediaRecorder(BuildConfig.DEBUG);
        HRecorder.init(this);
        registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
            @Override
            public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
                Log.e("----", activity.getLocalClassName());
            }

            @Override
            public void onActivityStarted(@NonNull Activity activity) {

            }

            @Override
            public void onActivityResumed(@NonNull Activity activity) {

            }

            @Override
            public void onActivityPaused(@NonNull Activity activity) {

            }

            @Override
            public void onActivityStopped(@NonNull Activity activity) {

            }

            @Override
            public void onActivitySaveInstanceState(@NonNull Activity activity, @NonNull Bundle outState) {

            }

            @Override
            public void onActivityDestroyed(@NonNull Activity activity) {

            }
        });
    }
}
